# -*- coding: cp936  -*- 
xxx=[1,20,50,50,500000]
def getmax(list):
    best=0
    for i in list:
        number=int(i)
        if number>best:
            best=number
    print best
getmax(xxx)


def getSmaills(list,n=1):
    a=0
    for x in list:
        num=int(x)
        if num<n:
           a=a+1;
    return a 
 
print getSmaills(xxx,500000000)

list=[1,2,1,56,4,3,2,3,56]
print list.pop()
print list
list.append('13575339318')
for x in list:
    print x,
print "\nthe list have",len(list),"numbers"

ab={'address':'haining',
    'address1':'beijing',
    'address2':'shanghai',
    };

ab['yeef']="zhejiang,jiangxing"
for x,d in ab.items():
    print 'the first secont is %s the address is %s' %(x,d)
print ab.keys()
print ab.has_key('address')
if 'address' in ab:
    print "this is an good coding"
del ab['address']
print ab

table = {'Sjoerd': 4127, 'Jack': 4098, 'Dcab': 7678}
for name,num in table.items():
   print '%-20s .==>. %20d' % (name, num)
tables = {'Sjoerd': 4127, 'Jack': 4098, 'Dcab': 8637678}
print 'Jack: %(Jack)d; Sjoerd: %(Sjoerd)d; Dcab: %(Dcab)d' % tables
for name,phone in tables.items():
    for i in range(1,2):
        print i,"%-10s   >>>    %10d" %(name,phone) 
   
   
#example=raw_input("enter an word :")
#name=str(example)
#for i  in range(1,50):
#    for x in name:
        
#        print x,i,
#file=file('D:\yeef.txt','r+')
#file.write(name)



#file.close()



    



class SchoolMember:
    '''Represents any school member.'''
    def __init__(self, name, age):
        self.name = name
        self.age = age
        print '(Initialized SchoolMember: %s)' % self.name

    def tell(self):
        '''Tell my details.'''
        print 'Name:"%s" Age:"%s"' % (self.name, self.age),

class Teacher(SchoolMember):
    '''Represents a teacher.'''
    def __init__(self, name, age, salary):
        SchoolMember.__init__(self, name, age)
        self.salary = salary
        print '(Initialized Teacher: %s)' % self.name

    def tell(self):
        SchoolMember.tell(self)
        print 'Salary: "%d"' % self.salary

class Student(SchoolMember):
    '''Represents a student.'''
    def __init__(self, name, age, marks):
        SchoolMember.__init__(self, name, age)
        self.marks = marks
        print '(Initialized Student: %s)' % self.name

    def tell(self):
        SchoolMember.tell(self)
        print 'Marks: "%d"' % self.marks

t = Teacher('Mrs. Shrividya', 40, 30000)
s = Student('Swaroop', 22, 75)

print # prints a blank line

members = [t, s]
for member in members:
    member.tell() # works for both Teachers and Students
    
    
a=[4444,44,55,55,66]
a.append("sss")
for x in range(len(set(a))):
    print x,

import smtplib
print dir(smtplib),help(smtplib)



def test(n):
    return lambda x : x*n
x=test(45)
print x("yeef")


a=['yeef','yeef2']
print a
w=repr(a)
b=[]
b.append(w)
print b

exec "print 'ss' "
print eval('2*5')




